<?php
$config = array(
    'basePath' => APP_PATH,
    'name' => 'Geo',
    'catchAllRequest' => array('front/handleRequest'),
    'modules' => array('admin', 'site'),
	'defaultController'=>'site/index/index',
	'preload'=>array('log'),
	'components' => array(
	    'user' => array(
		    'class' => 'WebUser',
		    'loginUrl' => array('/admin/auth/login'),
	    ),
	    'clientScript' => array(
		    'class' => 'ClientScript',
	    ),
	    'format' => array(
		    'class' => 'Formatter',
	    ),
		'dateFormat' => array(
		    'class' => 'DateFormatter',
	    ),
	    'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
				'class'=>'CFileLogRoute',
				'levels'=>'error, warning',
				),
			),
	    ),
	    'securedSession' => array(
			'class' => 'SecuredSession'
	    ),
	),

	'language' => 'ru',

	'import' => array(
		'application.components.*',
		'application.models.*',
		'application.modules.admin.components.*',
		'application.modules.site.components.*',
	),
);
require dirname(__FILE__) . '/db.php';
$config['components']['db'] = &$config['components']['main'];
return $config;